package com.yehuo.app.entity.dto;

import com.yehuo.app.entity.Withdrawal;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Data
public class SelectWithdrawalDto extends Withdrawal {
    private Integer limit=10;

    private Integer page=1;

    private String userName;

    /**
     * 时间搜索
     */
    private Date startTime;
    private Date endTime;
    /**
     * 获取查询条件
     * @return
     */
    public Map<String, Object> getCondition(){
        Map<String, Object> map = new HashMap<>();
        map.put("status", this.getStatus());
        map.put("withdrawalType", this.getWithdrawalType());
        map.put("wthdrawalId", this.getId());
        map.put("status", this.getStatus());
        map.put("endTime", this.getEndTime());
        map.put("startTime", this.getStartTime());
        map.put("userName", this.getUserName());
        return map;
    }
}
